﻿<html>
<head>
<meta content="text/html;" charset="utf-8" http-equiv="content-type">
<title>简单查询工具</title>

<!-- 
<script language="javascript" src="jquery-1.12.0.js"></script>

<script language="javascript" type="text/javascript">

// 选项改变时，触发动作，主要是显示自己的ip
function optionChange()
{
	tool_selected=$("#tool_selected").val();
	$("#tool_content").val("");
	if(tool_selected == "ip_location")
	{
		$.get("small_common_tools.php", {"getclientip": "1"}, function(data){
			$("#tool_content").val(data);
		});
	}
}

// 点击查询发送ajax请求
function onSearch()
{
	// 先清空查询结果内容
	$("#search_result").html("<font color='red'>查询中，请稍后。。。</font>");
	
	tool_selected=$("#tool_selected").val();
	tool_content=$("#tool_content").val();
	
	// 发送ajax请求
	
	$.post("small_common_tools.php", {"tool_selected":tool_selected, "tool_content":tool_content},
	//$.post("small_common_tools.php",
		function(data, ret){
			if(ret != "success")
			{
				$("#search_result").html("<font color='red'>查询失败，请重试。</font>");
			}
			else
			{
				$("#search_result").html("<font color='red'>" + data + "</font>");
			}
	});
}

</script>
-->

<script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>

<body>

<div ng-app="tool_div" align="center">
	<!-- 左边框 -->
	<table>
		<tr>
			<td>
			<select name="请选择查询类型" id="tool_selected" borderColor="#1699CC" align="center" onchange="optionChange()">
				<option value="no_selected">请选择查询类型 ... </option>
				<option value="phone_114" selected>114 电话查询</option>
				<option value="phone_location">电话号码归属地查询</option>
				<option value="idcard_location">身份证归属地查询</option>
				<option value="ip_location">IP 归属地 查询</option>
			</select>
			</td>
			
			<!-- 右边框 -->
			<td>
			<input class="TextBoxStyle" maxLength="32" name="tool_content" size="18" id="tool_content">
			<input class="ButtonStyle" type="button" value="查询" id="tool_submit" onClick="onSearch()">
			</td>
		</tr>
		
		<tr>
			<td align="texttop"> <b>查询结果：</b> </td> 
			<td id="search_result"> <font color="red">  </font> </td>
		</tr>
		
		<tr>
		</tr>
	</table>
	
</div>

</body>

</html>